Skip to content

feat: add miden-genesis tool for canonical genesis state#1797

Draft
mmagician wants to merge 4 commits intonextfrom
mmagician-default-genesis
Draft

feat: add miden-genesis tool for canonical genesis state#1797
mmagician wants to merge 4 commits intonextfrom
mmagician-default-genesis

Conversation

@mmagician
Copy link
Contributor

Summary

  • Adds a new miden-genesis binary crate that generates canonical AggLayer genesis accounts and a genesis.toml config file
  • Generates three accounts: bridge admin (wallet), GER manager (wallet), and bridge (NoAuth)
  • Only the bridge account (nonce=1) is included in genesis.toml for the genesis block; bridge admin and GER manager are local accounts (nonce=0) to be deployed later via transactions
  • Supports both default mode (generates Falcon512 keypairs) and custom mode (accepts hex-encoded public keys)

Closes #1788

Operator workflow

# Generate canonical genesis accounts
miden-genesis --output-dir ./genesis

# Bootstrap the node
miden-node validator bootstrap \
  --genesis-block-directory ./data \
  --accounts-directory ./accounts \
  --genesis-config-file ./genesis/genesis.toml \
  --validator.key.hex <key>

Test plan

  • cargo build -p miden-genesis compiles
  • miden-genesis --output-dir /tmp/genesis-test generates 3 .mac files + genesis.toml
  • miden-node validator bootstrap with the generated config produces a valid genesis block
  • make lint passes
  • cargo nextest run -p miden-node-store - all 118 tests pass

🤖 Generated with Claude Code

claude added 4 commits March 16, 2026 12:50
New binary crate that generates canonical AggLayer genesis accounts
(bridge, bridge admin, GER manager) and a genesis.toml config file.
Only the bridge account is included in the genesis block; bridge admin
and GER manager are generated as local accounts to be deployed later.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add description, keywords, and exclude to match other bin/ crate
conventions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define the canonical genesis state

2 participants